package com.t114514.demo.mapper;

import com.t114514.demo.pojo.Course;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CourseMapper {
    @Select("select * from course")
    List<Course> selectCourse();

    @Insert("insert into course(courseName) values(#{courseName})")
    void insertCourse(Course course);

    @Delete("delete from course where courseId=#{courseId}")
    void deleteCourse(Integer courseId);
}
